<!--//--><![CDATA[//><!--
sfHover = function() {
	var sfEls = document.getElementById("menuHoriz").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+="sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className='';
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

sfKeys = function(node) {
	var sfEls = document.getElementById("menuHoriz").getElementsByTagName("A");
	for (var i=0; i<sfEls.length; i++) {
		if(sfEls[i].nextSibling && sfEls[i].nextSibling.nextSibling){
			if(sfEls[i].nextSibling.nextSibling.nodeName == 'UL'){
				sfEls[i].onkeypress=function(e) {
					if (window.event){ e = window.event; }
					if (e.keyCode){
						code = e.keyCode;
					}else if(e.which){
						code = e.which;
					}
					if(code != 9){
						var parentobj = this.parentNode;
						var sfEls = parentobj.parentNode.getElementsByTagName("LI");
						for (var i=0; i<sfEls.length; i++) {
							if(sfEls[i] != parentobj){
								if(sfEls[i].className == 'sfhover'){
									sfEls[i].className='';
								}
							}
						}
						if(parentobj.className =='sfhover'){
							parentobj.className='';
						}else{
							parentobj.className+="sfhover";
						}
					}
				}
			}
		}
	}
	
	/*var menuItems = document.getElementById("menuHoriz").getElementsByTagName("A");
	for (var i=0; i<menuItems.length; i++)
	{
		if(location.href == menuItems[i].href)
		{
			if(menuItems[i].href.indexOf("NewLicense.aspx", 0) > 0)
			{
				document.getElementById("linknovalicenca").className = "novalicencahover";
				break;
			}
			else if(menuItems[i].href.indexOf("ManageCompanies.aspx", 0) > 0)
			{
				document.getElementById("linkcadastrarempresas").className = "cadastrarempresashover";
				break;
			}
			else if(menuItems[i].href.indexOf("SearchHistory.aspx", 0) > 0)
			{
				document.getElementById("linkconsultarhistorico").className = "consultarhistoricohover";
				break;
			}
			else if(menuItems[i].href.indexOf("SearchLicenses.aspx", 0) > 0)
			{
				document.getElementById("linkconsultarlicencas").className = "consultarlicencashover";
				break;
			}
			else if(menuItems[i].href.indexOf("ManageAliases.aspx", 0) > 0)
			{
				document.getElementById("linkcadastraraliases").className = "cadastraraliaseshover";
				break;
			}
		}
	}*/
}
window.onload = sfKeys;
//--><!]]>